<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>坐标：clientX/Y，pageX/Y</title>
		<style>
			body {
				height: 3000px;
			}
		</style>
	</head>
	<body>
		<div></div>

		<script>
			document.addEventListener('mousemove', function (event) {
				console.log('相对于窗口 clientX/Y', event.clientX, event.clientY)
				console.log('相对于文档 pageX/Y', event.pageX, event.pageY)
			})
		</script>
	</body>
</html>
